<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function add(a) {
            return function (b) {
                console.warn("snv",b,a)
                return a + b;
            };
        }
        const addFive = add(5); // 预设一个参数5
        console.warn(addFive);
        console.log(addFive(2)); // 输出7

    </script>
</body>

</html>